package com.mfm.service.impl;

import com.mfm.bean.Student;
import com.mfm.dao.StudentDao;
import com.mfm.dao.impl.StudentDaoImpl;
import com.mfm.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao = new StudentDaoImpl();
    @Override
    public List<Student> queryAll(String stuname,String stuno,int sex,int pageIndex,int pageSize) {
        return studentDao.queryAll(stuname,stuno,sex,pageIndex,pageSize);
    }

    @Override
    public int total(String stuname, String stuno, int sex) {
        return studentDao.total(stuname,stuno,sex);
    }

    @Override
    public int insertStu(Student student) {
        return studentDao.update(student);
    }

    @Override
    public Student findById(int sid) {
        return studentDao.findById(sid);
    }

    @Override
    public int updateStu(Student student) {
        return studentDao.updateStu(student);
    }

    @Override
    public int deleteStu(String sid) {
        return studentDao.deleteStu(sid);
    }

    @Override
    public boolean selectByStuNo(String stuNo) {
        return studentDao.selectByStuNo(stuNo);
    }


}
